home *** CD-ROM | disk | FTP | other *** search
/ Apple WWDC 1996 / WWDC96_1996 (CD).toast / Technology Materials / MacOS 8 Resources / Developer Tools / Mac OS 8 Interfaces & Libraries / Interfaces / PInterfaces / SCSIPlugin.p < prev    next >
Text File  |  1996-05-01  |  4KB  |  126 lines

  1. {
  2.      File:        SCSIPlugin.p
  3.  
  4.      Contains:    Family defined Plugin exports and data structures
  5.  
  6.      Version:    Technology:    xxx put the technology version here xxx
  7.                  Release:    Universal Interfaces 3.0d3 on Copland DR1
  8.  
  9.      Copyright:    © 1984-1996 by Apple Computer, Inc.  All rights reserved.
  10.  
  11.      Bugs?:        If you find a problem with this file, send the file and version
  12.                  information (from above) and the problem description to:
  13.  
  14.                      Internet:    apple.bugs@applelink.apple.com
  15.                      AppleLink:    APPLE.BUGS
  16.  
  17. }
  18. {$IFC UNDEFINED UsingIncludes}
  19. {$SETC UsingIncludes := 0}
  20. {$ENDC}
  21.  
  22. {$IFC NOT UsingIncludes}
  23.  UNIT SCSIPlugin;
  24.  INTERFACE
  25. {$ENDC}
  26.  
  27. {$IFC UNDEFINED __SCSIPLUGIN__}
  28. {$SETC __SCSIPLUGIN__ := 1}
  29.  
  30. {$I+}
  31. {$SETC SCSIPluginIncludes := UsingIncludes}
  32. {$SETC UsingIncludes := 1}
  33.  
  34. {$IFC UNDEFINED __TYPES__}
  35. {$I Types.p}
  36. {$ENDC}
  37. {$IFC UNDEFINED __KERNEL__}
  38. {$I Kernel.p}
  39. {$ENDC}
  40. {$IFC UNDEFINED __SCSI__}
  41. {$I SCSI.p}
  42. {$ENDC}
  43.  
  44. {$PUSH}
  45. {$ALIGN POWER}
  46. {$LibExport+}
  47.  
  48. {$IFC FOR_SYSTEM8_PREEMPTIVE }
  49. {
  50. ************************************************************************
  51.         Define entries to SIM routines
  52. ************************************************************************
  53.   SIMInitInfo PB
  54.      directions are for SCSIPluginInit call ( -> parm, <- result)             */
  55.  need to change this to PluginControlBlock ***
  56. }
  57.  
  58. TYPE
  59.     PluginControlBlockPtr = ^PluginControlBlock;
  60.     PluginControlBlock = RECORD
  61.         ioPBSize:                UInt16;                                    {  <- size of SCSI_IO_PBs required for this SIM             }
  62.         oldCallCapable:            UInt16;                                    {  <- true if this SIM can handle old-API calls             }
  63.         busID:                    UInt16;                                    {  <- bus number for the registered bus                     }
  64.         simSlotNumber:            SInt8;                                    {  <- Magic cookie to place in scsiHBASlotNumber (PCI)     }
  65.         simSRsrcID:                SInt8;                                    {  <- Magic cookie to place in scsiSIMsRsrcID     (PCI)     }
  66.         simRegEntry:            Ptr;                                    {  -> The SIM's RegEntryIDPtr                    (PCI)     }
  67.         maxTargetID:            UInt32;                                    {  <- max Target ID of this bus }
  68.         initiatorID:            UInt32;                                    {  <- comes from the NVRAM                                  }
  69.         scsiTimeout:            UInt32;                                    {  <- bus time out period }
  70.         scsiFlagsSupported:        UInt32;                                    {  <- scsiFlags supported by this SIM }
  71.         scsiSelectTimeout:        SInt16;                                    {  <- selection time out period }
  72.         scsiIOFlagsSupported:    UInt16;                                    {  <- scsiIOFlags supported by this SIM }
  73.         scsiDataTypes:            UInt32;                                    {  <- scsiDataType supported by this SIM }
  74.                                                                         {   *** need to remove the following declares ASAP plugin is ready }
  75.                                                                         {     SCSIPluginActionEntry            scsiPluginAction;                    // address of SIM action routine }
  76.                                                                         {     SCSIPluginHandleBusEventEntry    scsiPluginHandleBusEvent; }
  77.                                                                         {     SCSIPluginInitEntry                scsiPluginInit; }
  78.     END;
  79.  
  80. {  Define SIM calls passed into the family at initialize time }
  81.     SCSIPluginActionEntry = ProcPtr;  { PROCEDURE SCSIPluginActionEntry(VAR scsiPB: SCSI_PB); C; }
  82.  
  83.     SCSIPluginHandleBusEventEntry = ProcPtr;  { PROCEDURE SCSIPluginHandleBusEventEntry(busEvent: UNIV Ptr); C; }
  84.  
  85.     SCSIPluginInitEntry = ProcPtr;  { FUNCTION SCSIPluginInitEntry(VAR pcb: PluginControlBlock): OSStatus; C; }
  86.  
  87.  
  88. CONST
  89.     kSCSIPluginVersion            = $02019600;                    {  date and version *** temporary }
  90.  
  91.  
  92. TYPE
  93.     SCSIPluginInfoPtr = ^SCSIPluginInfo;
  94.     SCSIPluginInfo = RECORD
  95.         version:                UInt32;
  96.         reserved1:                UInt32;
  97.         reserved2:                UInt32;
  98.         reserved3:                UInt32;
  99.     END;
  100.  
  101. {  plugin needs to export this structure }
  102.     SCSIPluginDispatchTablePtr = ^SCSIPluginDispatchTable;
  103.     SCSIPluginDispatchTable = RECORD
  104.         header:                    SCSIPluginInfo;
  105.         scsiPluginAction:        SCSIPluginActionEntry;                    {  address of SIM action routine }
  106.         scsiPluginHandleBusEvent: SCSIPluginHandleBusEventEntry;
  107.         scsiPluginInit:            SCSIPluginInitEntry;
  108.     END;
  109.  
  110. PROCEDURE SCSIPluginAction(VAR scsiPB: SCSI_PB); C;
  111. PROCEDURE SCSIPluginHandleBusEvent(busEvent: UNIV Ptr); C;
  112. FUNCTION SCSIPluginInit(VAR pcb: PluginControlBlock): OSStatus; C;
  113. PROCEDURE SCSIFamMakeCallback(VAR req: SCSI_PB); C;
  114. FUNCTION SCSIFamBusEventForSIM(busID: UInt32; busEvent: UNIV Ptr): OSStatus; C;
  115. {$ENDC}
  116. {$ALIGN RESET}
  117. {$POP}
  118.  
  119. {$SETC UsingIncludes := SCSIPluginIncludes}
  120.  
  121. {$ENDC} {__SCSIPLUGIN__}
  122.  
  123. {$IFC NOT UsingIncludes}
  124.  END.
  125. {$ENDC}
  126.